<template>
  <div class="items-box">
    <img
      class="cover-img"
      v-imgError2
      src="./../../researchResult/assets/images/list-pic.jpg"
      alt=""
    />
    <div class="text-box">
      <div class="title">{{ item.title }}</div>
      <div class="type">
        <span class="type-word">{{ item.type }}</span>
      </div>
      <div class="time-row">
        <span class="">{{ item.time }}</span>
        <span>{{ item.source }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  // 组件名称
  name: "ListItems",
  props: ["item", "isHideLine"],
  // 局部注册的组件
  components: {},
  // 组件状态值
  data() {
    return {};
  },
  methods: {},
  created() {},
  mounted() {},
};
</script>
<style lang="less" scoped>
.items-box {
  width: 580px;
  flex-shrink: 0;
  // height: 120px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  margin: 20px 0 30px;
  display: flex;
  // padding-bottom: 30px;
  padding: 0 20px 30px;

  .cover-img {
    width: 180px;
    height: 220px;
    flex-shrink: 0;
    margin-right: 15px;
    margin-top: -30px;
  }

  .text-box {
    display: flex;
    flex-direction: column;
    justify-content: center;

    .title {
      font-size: 24px;
      margin-bottom: 20px;
      -webkit-line-clamp: 2;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .type {
      margin-bottom: 20px;
      .type-word {
        padding: 3px 5px;
        background: #95bff0;
        border: 1px solid #15539a;
        color: #15539a;
        border-radius: 4px;
      }
    }

    .time-row {
      display: flex;
      align-items: center;
      font-size: 16px;
      color: #ccc;
      justify-content: space-between;
    }
  }
}
</style>
